package com.bc.bclocalserviceapihttp.controller;

import com.bc.bcapi.service.TestUserService;
import com.bc.bcmodel.domain.T_Mnguser_infoModel;
import com.bc.commonentity.common.JsonResult;
import io.swagger.annotations.*;
import org.apache.poi.util.SystemOutLogger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Name UserController
 * @Description
 * @Author douhaichao
 * @Date 2018/8/2 14:19
 * @Version 1.0
 **/
@RestController
@RequestMapping(value = "user")
@Api(value = "用户接口")
public class UserController {
    private static final Logger LOGGER = LoggerFactory.getLogger(UserController.class);

    @Autowired
    TestUserService userService;

    @ApiOperation(value = "用户登录")
    @RequestMapping(value = "login")
    public JsonResult login(@RequestBody T_Mnguser_infoModel req) {
        return userService.login(req);
    }

    @ApiOperation(value = "用户注册")
    @RequestMapping(value = "register", method = RequestMethod.GET)
    public JsonResult register(T_Mnguser_infoModel req) {
        return JsonResult.get(1);// userService.register(req);
    }

}
